package hadoop.ch03.v17124080106;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import java.net.URI;
public class DeleteHDFSFile {
    public static void main(String[] args) throws Exception {
        Configuration conf = new Configuration();
        URI uri = new URI("hdfs://192.168.30.130:8020");
        FileSystem fs = FileSystem.get(uri, conf, "hadoop");
        Path path = new Path("/v17124080106/test2.txt");
        fs.delete(path);
        fs.close();

        System.out.println("Delete File Successfully!");
    }
}
